Global Index
HTML5 JS API Index > Browser Tutorials & Specs

Window

Extends EventTarget. Implements GlobalEventHandlers, WindowEventHandlers, WindowBase64, WindowTimers, ImageBitmapFactories, WindowSessionStorage, WindowLocalStorage, IDBEnvironment.

Extended by Window (Animation Timing), Window (CSS Object Model)
Properties
ApplicationCacheapplicationCache
boolean
closed
The closed attribute on Window objects must return true if the Window object's browsing context has been discarded, and false otherwise.
Document
document
The document IDL attribute must return the Window object's newest Document object.
External
external
The external attribute of the Window interface must return an instance of the External interface. The same object must be returned each time.
Element?frameElement
WindowProxy
frames
The window, frames, and self IDL attributes must all return the Window object's browsing context's WindowProxy object.
History
history
The history attribute of the Window interface must return the object implementing the History interface for that Window object's newest Document.
IDBFactory
indexedDB
This attribute provides applications a mechanism for accessing capabilities of indexed databases.
unsigned long
length
The length IDL attribute on the Window interface must return the number of child browsing contexts that are nested through elements that are in the Document that is the active document of that Window object, if that Window's browsing context shares the same event loop as the responsible document specified by the entry settings object accessing the IDL attribute; otherwise, it must return zero.
Storage
localStorage
The localStorage object provides a Storage object for an origin.
Location
location
The location attribute of the Window interface must return the Location object for that Window object's Document.
BarProp
locationbar
The locationbar attribute must return the location bar BarProp object.
DOMString
name
The name attribute of the Window object must, on getting, return the current name of the browsing context, if one is set, or the empty string otherwise; and, on setting, set the name of the browsing context to the new value.
EventHandleronabort
EventHandleronafterprint
EventHandleronautocomplete
EventHandleronautocompleteerror
EventHandleronbeforeprint
OnBeforeUnloadEventHandleronbeforeunload
EventHandleronblur
EventHandleroncancel
EventHandleroncanplay
EventHandleroncanplaythrough
EventHandleronchange
EventHandleronclick
EventHandleronclose
EventHandleroncontextmenu
EventHandleroncuechange
EventHandlerondblclick
EventHandlerondrag
EventHandlerondragend
EventHandlerondragenter
EventHandlerondragexit
EventHandlerondragleave
EventHandlerondragover
EventHandlerondragstart
EventHandlerondrop
EventHandlerondurationchange
EventHandleronemptied
EventHandleronended
OnErrorEventHandleronerror
EventHandleronfocus
EventHandleronhashchange
EventHandleroninput
EventHandleroninvalid
EventHandleronkeydown
EventHandleronkeypress
EventHandleronkeyup
EventHandleronlanguagechange
EventHandleronload
EventHandleronloadeddata
EventHandleronloadedmetadata
EventHandleronloadstart
EventHandleronmessage
EventHandleronmousedown
EventHandleronmouseenter
EventHandleronmouseleave
EventHandleronmousemove
EventHandleronmouseout
EventHandleronmouseover
EventHandleronmouseup
EventHandleronmousewheel
EventHandleronoffline
EventHandlerononline
EventHandleronpagehide
EventHandleronpageshow
EventHandleronpause
EventHandleronplay
EventHandleronplaying
EventHandleronpopstate
EventHandleronprogress
EventHandleronratechange
EventHandleronreset
EventHandleronresize
EventHandleronscroll
EventHandleronseeked
EventHandleronseeking
EventHandleronselect
EventHandleronshow
EventHandleronsort
EventHandleronstalled
EventHandleronstorage
EventHandleronsubmit
EventHandleronsuspend
EventHandlerontimeupdate
EventHandlerontoggle
EventHandleronunload
EventHandleronvolumechange
EventHandleronwaiting
WindowProxy?
opener
The opener IDL attribute on the Window object, on getting, must return the WindowProxy object of the browsing context from which the current browsing context was created (its opener browsing context), if there is one, if it is still available, and if the current browsing context has not disowned its opener; otherwise, it must return null.
WindowProxy
parent
The parent IDL attribute on the Window object of a Document in a browsing context b must return the WindowProxy object of the parent browsing context, if there is one (i.e. if b is a child browsing context), or the WindowProxy object of the browsing context b itself, otherwise (i.e.
BarProp
personalbar
The personalbar attribute must return the personal bar BarProp object.
BarProp
scrollbars
The scrollbars attribute must return the scrollbar BarProp object.
WindowProxy
self
The window, frames, and self IDL attributes must all return the Window object's browsing context's WindowProxy object.
Storage
sessionStorage
The sessionStorage attribute represents the set of storage areas specific to the current top-level browsing context.
DOMString
status
For historical reasons, the status attribute on the Window object must, on getting, return the last string it was set to, and on setting, must set itself to the new value. When the Window object is created, the attribute must be set to the empty string.
BarProp
statusbar
The statusbar attribute must return the status bar BarProp object.
BarProp
toolbar
The toolbar attribute must return the toolbar BarProp object.
WindowProxy
top
The top IDL attribute on the Window object of a Document in a browsing context b must return the WindowProxy object of its top-level browsing context (which would be its own WindowProxy object if it was a top-level browsing context itself), if it has one, or its own WindowProxy object otherwise (e.g.
WindowProxy
window
The window, frames, and self IDL attributes must all return the Window object's browsing context's WindowProxy object.
Operations
voidalert(optional DOMString message)
DOMStringatob(DOMString atob)
voidblur()
DOMString
btoa(DOMString btoa)
The btoa() method must throw an InvalidCharacterError exception if the method's first argument contains any character whose code point is greater than U+00FF. Otherwise, the user agent must convert that argument to a sequence of octets whose nth octet is the eight-bit representation of the code point of the nth character of the argument, and then must apply the base64 algorithm to that sequence of octets, and return the result.
void
cancelAnimationFrame(long handle)
The cancelAnimationFrame method is used to cancel a previously made request to schedule an animation frame update. When cancelAnimationFrame(handle) is called, the user agent MUST set the cancelled flag to true for the callback registered on this Document whose handle is handle.
void
clearInterval(optional long handle)
The clearTimeout() and clearInterval() methods must clear the entry identified as handle from the list of active timers of the WindowTimers object on which the method was invoked, if any, where handle is the argument passed to the method. (If handle does not identify an entry in the list of active timers of the WindowTimers object on which the method was invoked, the method does nothing.)
void
clearTimeout(optional long handle)
The clearTimeout() and clearInterval() methods must clear the entry identified as handle from the list of active timers of the WindowTimers object on which the method was invoked, if any, where handle is the argument passed to the method. (If handle does not identify an entry in the list of active timers of the WindowTimers object on which the method was invoked, the method does nothing.)
voidclose()
booleanconfirm(optional DOMString message)
Promise
createImageBitmap(ImageBitmapSource image, optional long sx, long sy, long sw, long sh)
An ImageBitmap object can be obtained from a variety of different objects, using the createImageBitmap() method.
voidfocus()
CSSStyleDeclarationgetComputedStyle(Element elt, optional DOMString pseudoElt)
WindowProxy
getter(any index_name)
To determine the value of an indexed property index of a Window object, the user agent must return the WindowProxy object of the indexth child browsing context of the Document that is nested through an element that is in the Document, sorted in the order that the elements nesting those browsing contexts were most recently inserted into the Document, the WindowProxy object of the most recently inserted browsing context container's nested browsing context being last.
WindowProxy
open(optional DOMString url, optional DOMString target, optional DOMString features, optional boolean replace)
The open() method on Window objects provides a mechanism for navigating an existing browsing context or opening and navigating an auxiliary browsing context.
voidpostMessage(any message, DOMString targetOrigin, optional sequence<Transferable> transfer)
void
print()
When the print() method is invoked, if the Document is ready for post-load tasks, then the user agent must synchronously run the printing steps. Otherwise, the user agent must only set the print when loaded flag on the Document.
DOMString?prompt(optional DOMString message, optional DOMString default)
long
requestAnimationFrame(FrameRequestCallback callback)
The requestAnimationFrame method is used to signal to the user agent that a script-based animation needs to be resampled. When requestAnimationFrame(callback) is called, the user agent MUST schedule a script-based animation resampling by appending to the end of the animation frame request callback list an entry whose handle is a user-agent-defined integer greater than zero that uniquely identifies the entry in the list and whose callback is callback.
long
setInterval(any handler, optional long timeout, any arguments...)
The setInterval() method must return the value returned by the timer initialization steps, passing them the method's arguments, the object on which the method for which the algorithm is running is implemented (a Window or WorkerGlobalScope object) as the method context, and the repeat flag set to true.
long
setTimeout(any handler, optional long timeout, any arguments...)
The setTimeout() method must return the value returned by the timer initialization steps, passing them the method's arguments, the object on which the method for which the algorithm is running is implemented (a Window or WorkerGlobalScope object) as the method context, and the repeat flag set to false.
anyshowModalDialog(DOMString url, optional any argument)
void
stop()
The stop() method on Window objects should, if there is an existing attempt to navigate the browsing context and that attempt is not currently running the unload a document algorithm, cancel that navigation; then, it must abort the active document of the browsing context of the Window object on which it was invoked.